class RenameDbFields2 < ActiveRecord::Migration
  def self.up
    rename_column :tests, :maxTime, :max_time
    rename_column :tags, :label, :name
    rename_column :questions_tags, :tag_id, :category_id
    rename_table :tags, :categories
    rename_table :questions_tags, :categories_questions
    rename_table :tests, :questionnaires
  end

  def self.down
    rename_table :questionnaires, :tests
    rename_table :categories, :tags
    rename_table :categories_questions, :questions_tags
    rename_column :questions_tags, :category_id, :tag_id
    rename_column :tags, :name, :label
    rename_column :tests, :max_time, :maxTime
  end
end